ACTOR "Pig Cop Captain" : " Pig Cop " 31068
{
    //$Category DN3D Aliens //Pig Cops
    Health 235
	Obituary "%o was ripped to ribbons by a Pig Cop Captain."
	DropItem "Chaingun Cannon" 46 50
	DropItem "Chaingun Ammo" 32 50
    DropItem " Armor " 2
    States
    {
    Spawn:
        PCAP A 0
        PCAP A 0 Thing_ChangeTID(0,1000)
        PCAP A 2 A_Look
        Loop
    See:
	    PCAP A 0
	    PCAP A 0 A_ChangeFlag("NOPAIN",0)
		PCAP A 0 A_StopSoundEx("SoundSlot7")		
		PCAP AABB 3 A_Chase
		PCAP B 0 A_SpawnItem("AlienStep2",0,0,0,0)
		PCAP CCDD 3 A_Chase
		PCAP D 0 A_SpawnItem("AlienStep2",0,0,0,0)
        Loop		
    Missile:
		PCAP E 12 A_FaceTarget
		PCAP E 0 A_Jump(128,4)
		PCAP E 0 A_PlayWeaponSound("ChaingunCannon/Shoot")
        PCAP F 2 Bright A_CustomBulletAttack(Random(9,8),0,1,Random(8,9),"PigCopPuff",5000,CBAF_NORANDOM)
        PCAP E 2 A_CPosRefire
        Goto Missile+1
		PCAP E 0 A_PlayWeaponSound("ChaingunCannon/Shoot")
        PCAP G 2 Bright A_CustomBulletAttack(Random(8,9),0,1,Random(9,8),"PigCopPuff",5000,CBAF_NORANDOM)
        PCAP E 2 A_CPosRefire
        Goto Missile+1
    Pain:
        PCAP N 0
        PCAP N 8 A_Pain
        Goto See
	Pain.LaserShot:
	    PCAP N 0
		PCAP N 0 A_SpawnItemEx("PainTripLaser",0,0,5)
		PCAP N 0 HealThing(2)
		Goto See	
	Pain.Radial:
        PCAP N 0
        PCAP N 0 HealThing(2)
        Goto See
	Pain.Fire:
	    PCAF A 0
		PCAF A 0 A_GiveInventory("FireCheck",1)
		PCAF A 0 A_GiveInventory("FireCheckDeath",1)
		PCAF A 0 A_PlaySoundEx("FireLoop/Monsters","SoundSlot7",1)
		PCAF A 0 A_PlaySound("Pig/Pain",10)
		PCAF A 0 A_ChangeFlag("NOPAIN",1)
		PCAF A 0 A_ChangeFlag("FRIGHTENED",1)
		PCAF A 0 A_Wander
		PCAF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF A 0 A_Wander
		PCAF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF B 0 A_Wander
		PCAF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF B 0 A_Wander
		PCAF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF C 0 A_Wander
		PCAF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF C 0 A_Wander
		PCAF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF D 0 A_Wander
		PCAF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF D 0 A_Wander
		PCAF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PCAF A 0 A_Wander
		PCAF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF A 0 A_Wander
		PCAF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF B 0 A_Wander
		PCAF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF B 0 A_Wander
		PCAF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF C 0 A_Wander
		PCAF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF C 0 A_Wander
		PCAF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF D 0 A_Wander
		PCAF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF D 0 A_Wander
		PCAF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PCAF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PCAF D 0 A_JumpIfInventory("FireCheck",8,"PainFireStop")
		Loop	
	PainFireStop:
	    PCAF A 0 
		PCAF A 0 A_ChangeFlag("NOPAIN",0)
		PCAF A 0 A_ChangeFlag("FRIGHTENED",0)
		PCAF A 0 A_TakeInventory("FireCheck",999)
		PCAF A 0 A_TakeInventory("FireCheckDeath",999)
		PCAF A 0 A_StopSoundEx("SoundSlot7")
		Goto See
	Death:	
	    PCAP H 0
		PCAP H 0 A_JumpIfInventory("FireCheckDeath",1,"Burn")
		PCAP H 0 A_ChangeFlag("NOPAIN",0)
		PCAP H 0 A_StopSoundEx("SoundSlot7")
		PCAP H 0 A_Jump(256,1,7)
		PCAP H 7 A_Scream
        PCAP I 7
        PCAP J 7 A_NoBlocking
        PCAP KL 7
        PCAP M -1 
        Stop
		PCA2 H 7 A_Scream
        PCA2 I 7
        PCA2 J 7 A_NoBlocking
        PCA2 KL 7
		PCA2 M 1 A_GiveInventory("Death2Check",1)
		PCA2 M -1  
        Stop
    Death.Damage_Shrinker:
        PCAP A 0
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
		PCAP A 0 A_ChangeFlag("NOPAIN",0)
        PCAP A 10 A_PlaySound("Shrinker/Shrink")
		PCAP A 1 A_SetScale(0.70,0.70)
        PCAP A 1 A_SetScale(0.68,0.68)
        PCAP A 1 A_SetScale(0.66,0.66)
        PCAP A 1 A_SetScale(0.64,0.64)
        PCAP A 1 A_SetScale(0.62,0.62)
        PCAP A 1 A_SetScale(0.60,0.60)
        PCAP A 1 A_SetScale(0.58,0.58)
        PCAP A 1 A_SetScale(0.56,0.56)
        PCAP A 1 A_SetScale(0.54,0.54)
        PCAP A 1 A_SetScale(0.52,0.52)
        PCAP A 1 A_SetScale(0.50,0.50)
        PCAP A 1 A_SetScale(0.48,0.48)
        PCAP A 1 A_SetScale(0.46,0.46)
        PCAP A 1 A_SetScale(0.44,0.44)
        PCAP A 1 A_SetScale(0.42,0.42)
        PCAP A 1 A_SetScale(0.40,0.40)
        PCAP A 1 A_SetScale(0.38,0.38)
        PCAP A 1 A_SetScale(0.36,0.36)
        PCAP A 1 A_SetScale(0.34,0.34)
        PCAP A 1 A_SetScale(0.32,0.32)
        PCAP A 1 A_SetScale(0.30,0.30)
        PCAP A 1 A_SetScale(0.28,0.28)
        PCAP A 1 A_SetScale(0.26,0.26)
        PCAP A 1 A_SetScale(0.24,0.24)
        PCAP A 1 A_SetScale(0.22,0.22)
        PCAP A 1 A_SetScale(0.20,0.20)
		PCAP A 0 A_SpawnItemEx("Pig Cop Captain Shrunken",0,0,0,0,0,0,0,32,0)
        Stop
    Death.Damage_Explosion:
	Death.Damage_BigShock:
	Death.Damage_BigThunder:
		PCAP A 0
		PCAP A 0 A_ChangeFlag("NOPAIN",0)
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
        PCAP A 0 A_PlaySound("Gib/Explode",5)
        PCAP A 0 A_NoBlocking
        PCAP AAA 0 A_SpawnDebris("DukeGibs1")
        PCAP AAA 0 A_SpawnDebris("DukeGibs2")
		PCAP AAA 0 A_SpawnDebris("DukeGibs3")
        PCAP AAA 0 A_SpawnDebris("DukeGibs4")
        PCAP AAA 0 A_SpawnDebris("DukeGibs5")		
        PCAP AAAAAAAAA 0 A_SpawnDebris("DukeGibs6")
	    TNT1 A 1
	    Stop
    Death.Damage_Expander:
        PCAP A 0
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
		PCAP A 1 A_PlaySound("Expander/Expand",5)
		PCAP A 1 A_SetScale(0.71,0.71)
        PCAP A 1 A_SetScale(0.72,0.72)
		PCAP A 1 A_SetScale(0.73,0.73)
		PCAP A 1 A_SetScale(0.74,0.74)
		PCAP A 1 A_SetScale(0.75,0.75)
		PCAP A 1 A_SetScale(0.76,0.76)
		PCAP A 1 A_SetScale(0.77,0.77)
		PCAP A 1 A_SetScale(0.78,0.78)
		PCAP A 1 A_SetScale(0.79,0.79)
		PCAP A 1 A_SetScale(0.80,0.80)
		PCAP A 1 A_SetScale(0.81,0.81)
		PCAP A 1 A_SetScale(0.82,0.82)
		PCAP A 1 A_SetScale(0.83,0.83)
		PCAP A 1 A_SetScale(0.84,0.84)
		PCAP A 1 A_SetScale(0.85,0.85)
		PCAP A 1 A_SetScale(0.86,0.86)
		PCAP A 1 A_SetScale(0.87,0.87)
		PCAP A 1 A_SetScale(0.88,0.88)
		PCAP A 1 A_SetScale(0.89,0.89)
		PCAP A 1 A_SetScale(0.90,0.90)
		PCAP A 1 A_SetScale(0.91,0.91)
		PCAP A 1 A_SetScale(0.92,0.92)
		PCAP A 1 A_SetScale(0.93,0.93)
		PCAP A 1 A_SetScale(0.94,0.94)
		PCAP A 1 A_SetScale(0.95,0.95)
		PCAP A 1 A_SetScale(0.96,0.96)
		PCAP A 1 A_SetScale(0.97,0.97)
		PCAP A 1 A_SetScale(0.98,0.98)
		PCAP A 1 A_SetScale(0.99,0.99)
		PCAP A 1 A_SetScale(1.00,1.00)
		PCAP A 1 A_SetScale(1.01,1.01)
		PCAP A 1 A_SetScale(1.02,1.02)
		PCAP A 1 A_SetScale(1.03,1.03)
		PCAP A 1 A_SetScale(1.04,1.04)
		PCAP A 1 A_SetScale(1.05,1.05)
		PCAP A 1 A_SetScale(1.06,1.06)
		PCAP A 1 A_SetScale(1.07,1.07)
		PCAP A 1 A_SetScale(1.08,1.08)
		PCAP A 1 A_SetScale(1.09,1.09)
		PCAP A 1 A_SetScale(1.10,1.10)
		PCAP A 1 A_SetScale(1.11,1.11)
		PCAP A 1 A_SetScale(1.12,1.12)
		PCAP A 1 A_SetScale(1.13,1.13)
		PCAP A 1 A_SetScale(1.14,1.14)
        PCAP A 25 A_SetScale(1.15,1.15)
        PCAP A 0 A_SpawnItemEx("ExpanderExplosion",0,0,32,0,0,0,0,SXF_ABSOLUTEVELOCITY,0)
        Goto Death.Damage_Explosion
	Burn:
	    PCAF H 0
		PCAF H 0 A_ChangeFlag("NOPAIN",0)
		PCAF H 0 A_StopSoundEx("SoundSlot7")
		PCAF H 0 A_Jump(256,1,39)
		PCAF H 0 A_Scream
		PCAF HHHHHHH 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PCAF IIIIIII 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PCAF J 0 A_NoBlocking
		PCAF JJJJJJJ 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PCAF KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PCAF LLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PCAF L 1 Bright A_SpawnItemEx("FireintheFloor")
        PCAF M -1 
        Stop
		PCF2 H 0 A_Scream
		PCF2 HHHHHHH 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PCF2 IIIIIII 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PCF2 J 0 A_NoBlocking
		PCF2 JJJJJJJ 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PCF2 KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PCF2 LLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PCF2 L 1 Bright A_SpawnItemEx("FireintheFloor")
		PCF2 M 1 A_GiveInventory("Death2CheckFire",1)
		PCF2 M -1  
        Stop
	Raise:
	    TNT1 A 0 
	    TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_ChangeFlag("COUNTKILL",0)
		TNT1 A 0 A_ChangeFlag("SOLID",0)
	    PCAP M 0 A_JumpIfInventory("FireCheckDeath",1,"Raise2")
		PCAP M 0 A_JumpIfInventory("Death2Check",1,2)
		PCAP M 35
		Stop
		PCA2 M 0
		PCA2 M 35
		Stop
	Raise2:
		PCAF M 0
		PCAF M 0 A_JumpIfInventory("Death2CheckFire",1,2)
		PCAF M 35
		Stop
		PCF2 M 0
		PCF2 M 35
		Stop
        }
}

ACTOR "Pig Cop Captain Shrunken" 
{
    Health 30
    Radius 20
    Height 16
    Mass 0x7FFFFFFF
    Speed 3
    PainChance 128
    SeeSound "Pig/Sight"
    PainSound "Pig/Pain"
    DeathSound "Pig/Death"
    ActiveSound "Pig/Active"
	BloodColor "D1 0C 00" 
	Species "Alien"
    Scale 0.20
	DamageFactor "Damage_Foot", 5.0
	DamageFactor "LaserExplosion", 0.0
    DamageFactor "Damage_Shrinker", 0.0
	DamageFactor "Trip_Punch", 0.0
	Painchance "LaserShot", 256
	+ISMONSTER
	+SHOOTABLE
    +SOLID
	+NOTARGET
	+FRIGHTENED
    States
    {
    Spawn:
        PCAP A 0 
		PCAP A 0 A_JumpIfInventory("ShrunkenCheck",40,"Restore")
		PCAP A 0 A_GiveInventory("ShrunkenCheck",1)
        PCAP AAAAAAAA 3 A_Look
        Loop
    See:
	    PCAP A 0 
	    PCAP A 0 A_ChangeFlag("NOPAIN",0)
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
		PCAP A 0 A_JumpIfInventory("ShrunkenCheck",40,"Restore")
		PCAP A 0 A_GiveInventory("ShrunkenCheck",1)
		PCAP AABB 3 A_Chase
		PCAP B 0 A_SpawnItem("AlienStep2",0,0,0,0)
		PCAP CCDD 3 A_Chase
		PCAP D 0 A_SpawnItem("AlienStep2",0,0,0,0)
        Loop
    Pain:
		PCAP N 8 A_Pain
        Goto See 
	Pain.LaserShot:
	    PCAP N 0 
		PCAP N 0 A_SpawnItemEx("PainTripLaser",0,0,8)
		PCAP N 0 HealThing(2)
		Goto See
	Pain.Radial:
        PCAP N 0
        PCAP N 0 HealThing(2)
        Goto See
	Restore:
	    PCAP A 0
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
		PCAP A 0 A_ChangeFlag("NOPAIN",0)
        PCAP A 10 A_PlaySound("Shrinker/Shrink")
		PCAP A 1 A_SetScale(0.20,0.20)
        PCAP A 1 A_SetScale(0.22,0.22)
        PCAP A 1 A_SetScale(0.26,0.24)
        PCAP A 1 A_SetScale(0.24,0.24)
        PCAP A 1 A_SetScale(0.28,0.28)
        PCAP A 1 A_SetScale(0.30,0.30)
        PCAP A 1 A_SetScale(0.32,0.32)
        PCAP A 1 A_SetScale(0.34,0.34)
        PCAP A 1 A_SetScale(0.36,0.36)
        PCAP A 1 A_SetScale(0.38,0.38)
        PCAP A 1 A_SetScale(0.40,0.40)
        PCAP A 1 A_SetScale(0.42,0.42)
        PCAP A 1 A_SetScale(0.44,0.44)
        PCAP A 1 A_SetScale(0.46,0.46)
        PCAP A 1 A_SetScale(0.48,0.48)
        PCAP A 1 A_SetScale(0.50,0.50)
        PCAP A 1 A_SetScale(0.52,0.52)
        PCAP A 1 A_SetScale(0.54,0.54)
        PCAP A 1 A_SetScale(0.56,0.56)
        PCAP A 1 A_SetScale(0.58,0.58)
        PCAP A 1 A_SetScale(0.60,0.60)
        PCAP A 1 A_SetScale(0.62,0.62)
        PCAP A 1 A_SetScale(0.64,0.64)
        PCAP A 1 A_SetScale(0.66,0.66)
        PCAP A 1 A_SetScale(0.68,0.68)
        PCAP A 1 A_SetScale(0.70,0.70)
		PCAP A 0 A_SpawnItemEx("Pig Cop Captain",0,0,0,0,0,0,0,32,0)
        Stop
	Death:
	    PCAP A 0
		PCAP A 0 A_StopSoundEx("Body")
		PCAP A 0 A_StopSoundEx("SoundSlot7")
		PCAP A 0 A_ChangeFlag("NOPAIN",0)
		PCAP A 0 A_Stop
        PCAP A 0 A_PlaySound("DukeNukem/DeathLittle",5)
        PCAP A 0 A_NoBlocking
        PCAP A 0 A_SpawnDebris("DukeGibs1")
        PCAP A 0 A_SpawnDebris("DukeGibs2")
		PCAP A 0 A_SpawnDebris("DukeGibs3")
        PCAP A 0 A_SpawnDebris("DukeGibs4")
        PCAP A 0 A_SpawnDebris("DukeGibs5")		
        PCAP AAAAA 0 A_SpawnDebris("DukeGibs6")
	    TNT1 A 1
	    Stop
    }
}